package com.avfh.netcard.model;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author wuhui
 * @since 2017-06-28
 */
@TableName("bd_order")
public class Order extends Model<Order> {

    private static final long serialVersionUID = 1L;

    @TableId("order_id")
	private Long orderId;
    /**
     * 用户id
     */
	@TableField("user_id")
	private Long userId;
	private Double amount;
    /**
     * 订单状态(1:待付款,2:已完成,3:已取消)
     */
	private Integer status;
    /**
     * 套餐id
     */
	@TableField("package_id")
	private Long packageId;
    /**
     * 商品描述
     */
	private String desc;
    /**
     * 流水号
     */
	@TableField("trade_num")
	private String tradeNum;
	@TableField("created_at")
	private Date createdAt;
	@TableField("updated_at")
	private Date updatedAt;


	public Long getOrderId() {
		return orderId;
	}

	public Order setOrderId(Long orderId) {
		this.orderId = orderId;
		return this;
	}

	public Long getUserId() {
		return userId;
	}

	public Order setUserId(Long userId) {
		this.userId = userId;
		return this;
	}

	public Double getAmount() {
		return amount;
	}

	public Order setAmount(Double amount) {
		this.amount = amount;
		return this;
	}

	public Integer getStatus() {
		return status;
	}

	public Order setStatus(Integer status) {
		this.status = status;
		return this;
	}

	public Long getPackageId() {
		return packageId;
	}

	public Order setPackageId(Long packageId) {
		this.packageId = packageId;
		return this;
	}

	public String getDesc() {
		return desc;
	}

	public Order setDesc(String desc) {
		this.desc = desc;
		return this;
	}

	public String getTradeNum() {
		return tradeNum;
	}

	public Order setTradeNum(String tradeNum) {
		this.tradeNum = tradeNum;
		return this;
	}

	public Date getCreatedAt() {
		return createdAt;
	}

	public Order setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
		return this;
	}

	public Date getUpdatedAt() {
		return updatedAt;
	}

	public Order setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
		return this;
	}

	public static final String ORDER_ID = "order_id";

	public static final String USER_ID = "user_id";

	public static final String AMOUNT = "amount";

	public static final String STATUS = "status";

	public static final String PACKAGE_ID = "package_id";

	public static final String DESC = "desc";

	public static final String TRADE_NUM = "trade_num";

	public static final String CREATED_AT = "created_at";

	public static final String UPDATED_AT = "updated_at";

	@Override
	protected Serializable pkVal() {
		return this.orderId;
	}

}
